<template>
	<view class="Suspension">
		<u-modal :show="show" title='长按复制该链接' @confirm="show=false"><u-tooltip
				text="http://192.168.0.192:8080/#/pages/my" @click="show=false"></u-tooltip></u-modal>
		<view class="content">
			<!-- #ifndef MP-WEIXIN -->
			<view class="btn"><u-icon name="share" color="#9d9d9d" size="28" @click="show=true"></u-icon></view>
			<!-- #endif -->
			<!-- #ifdef MP-WEIXIN -->
			<button class="btn" open-type='share'><u-icon name="share" color="#9d9d9d" size="28"></u-icon></button>
			<!-- #endif -->
			<view class="btn"><u-icon name="phone" color="#9d9d9d" size="28" @click="phone"></u-icon></view>
			<view class="btn"><u-icon name="kefu-ermai" color="#9d9d9d" size="28" @click="chat"></u-icon></view>
		</view>
		<u-toast ref="uToast"></u-toast>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
			};
		},
		methods: {
			phone() {
				uni.makePhoneCall({
					phoneNumber: '19092476054',
				});
			},
			chat() {
				const userInfo = uni.getStorageSync('userInfo')
				this.$refs.uToast.show({
					type: "error",
					message: "请先登录"
				});
				if (userInfo) {
					uni.navigateTo({
						url: `/pages-sub/chat`
					})
				}
			}
		}
	}
</script>

<style>
	.Suspension {}

	.content {
		position: fixed;
		right: 8rpx;
		bottom: 160rpx;
		display: flex;
		flex-direction: column;
		align-content: center;
		justify-content: space-between;
		width: 80rpx;
		height: 260rpx;
	}

	.btn {
		width: 72rpx;
		height: 72rpx;
		display: flex;
		justify-content: center;
		box-shadow: 4rpx 4rpx 20rpx #9d9d9d;
		border-radius: 50%;
		background-color: #fff;
		opacity: .8;
	}
</style>